\documentclass[tikz,border=3pt]{standalone}
\usepackage{pgfplots}
\usepackage{ctex} % 添加中文字体支持
\pgfplotsset{compat=1.18}

\begin{document}
	
	\begin{tikzpicture}
		\begin{axis}[
			width=12cm,
			height=10cm,
			axis lines = middle,
			xlabel = $x$,
			ylabel = $y$,
			xmin = -3.5, xmax = 5.5,
			ymin = -3.5, ymax = 5.5,
			xtick = {-3,-2,-1,0,1,2,3,4,5},
			ytick = {-3,-2,-1,0,1,2,3,4,5},
			grid = both,
			grid style = {dotted, gray!50},
			legend pos = outer north east,
			]
			
			% 参考线 y = x
			\addplot[black, dotted, thick, domain=-3:5.5] {x};
			\node[above] at (4.5,4.8) {\footnotesize $y=x$};
			
			% 指数函数 e^x（凹函数）
			\addplot[blue, thick, domain=-3:1.6, samples=200] {exp(x)};
			\node[blue, right] at (1.5,4.48) {$y=e^x$ };
			
			% 对数函数 ln x（凸函数）
			\addplot[red, thick, domain=0.005:5, samples=1000] {ln(x)};
			\node[red, below] at (3.5,1.2) {$y=\ln x$ };
			
			% 抛物线右支 x^2 (x≥0)
			\addplot[green!70!black, thick, domain=0:2.2, samples=100] {x^2};
			\node[green!70!black, above] at (1.5,2.5) {$y=x^2$ };
			
			% 抛物线左支 x^2 (x<0) - 虚线
			\addplot[green!70!black, dashed, thick, domain=-2.2:0, samples=200] {x^2};
			
			% 平方根函数 sqrt(x) (凸函数)
			\addplot[orange!80!black, thick, domain=0:5, samples=300] {sqrt(x)};
			\node[orange!80!black, above left] at (3,1.6) {$y=\sqrt{x}$ };
			
			% 标注关键点
			%\draw[fill] (0,1) circle (1.5pt) node[left] {\scriptsize $(0,1)$};
			%\draw[fill] (1,0) circle (1.5pt) node[below right] {\scriptsize $(1,0)$};
			\draw[fill] (0,0) circle (1.5pt) node[below left] {\scriptsize $(0,0)$};
			\draw[fill] (1,1) circle (1.5pt) node[above left] {\scriptsize $(1,1)$};
			%\draw[fill] (2,4) circle (1.5pt) node[above] {\scriptsize $(2,4)$};
			%\draw[fill] (-2,4) circle (1.5pt) node[above] {\scriptsize $(-2,4)$};
			%\draw[fill] (4,2) circle (1.5pt) node[right] {\scriptsize $(4,2)$};
			
			% 凹凸性标注
			%\node[blue] at (0.5,3) {\footnotesize 凹函数};
			%\node[green!70!black] at (-1.5,2.5) {\footnotesize 凹函数};
			%\node[red] at (0.5,-1.2) {\footnotesize 凸函数};
			%\node[orange!80!black] at (4,1.5) {\footnotesize 凸函数};
			
			% ========== 修复的对称性标注 ==========
			% 新的对称性标注方法：与 y=x 线垂直的线段
			
			% 辅助计算函数：求直线上垂直于给定点的点
			% 参数：参考点 (x0,y0)，角度45度（y=x线是45度）
			% 垂直方向是135度（45+90）
			\tikzset{
				declare function={
					perp_x(\x,\y,\d,\a) = \x + \d*cos(\a+90);
					perp_y(\x,\y,\d,\a) = \y + \d*sin(\a+90);
				}
			}
			
		\end{axis}
	\end{tikzpicture}
\end{document}